package com.xxx.client;

import com.xxx.service.DemoService;
import com.xxx.service.UserService;

public class ClientBootStrap {


    public static void main(String[] args) throws InterruptedException {

        RpcConsumer rpcConsumer = new RpcConsumer();

        UserService userServiceProxy = (UserService) rpcConsumer.createProxy(UserService.class,
                "com.xxx.service.UserService.sayHello");


        DemoService demoServiceProxy = (DemoService) rpcConsumer.createProxy(DemoService.class,
                "com.xxx.service.DemoService.demo");

        while (true){
//            Thread.sleep(1000);
            System.out.println(userServiceProxy.sayHello("are you ok from user service"));

            Thread.sleep(1000);

            System.out.println(demoServiceProxy.demo("i am ok from demo service"));
        }


    }




}
